package com.gcb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gcb.domain.bo.ProjectBIBO;
import com.gcb.domain.dto.ProjectQueryDTO;
import com.gcb.domain.entity.Project;
import com.gcb.domain.vo.ProjectVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ProjectMapper extends BaseMapper<Project> {

    List<ProjectVO> getPageList(ProjectQueryDTO dto);

    ProjectVO getDetail(String id);

    List<ProjectVO> getUserProjectList(@Param("projectName") String projectName, @Param("companyId") Integer companyId);

    String existNameByCompanyId(@Param("projectName") String projectName,
                                @Param("companyId") Long companyId,
                                @Param("id") Long id);

    List<ProjectBIBO> selectBIList(@Param("flag") Integer flag,
                                   @Param("city") String city);

}
